package com.qfedu.fmshop.service.Impl;

import com.qfedu.fmshop.Vo.CategoryVo;
import com.qfedu.fmshop.beans.IndexImg;
import com.qfedu.fmshop.mapper.IndexMapper;
import com.qfedu.fmshop.service.IndexService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;

import java.util.List;
@Slf4j
@Configuration
public class IndexServiceImpl implements IndexService {

    @SuppressWarnings("SpringJavaInjectionPointsAutowiringInspection")
    @Autowired
    private IndexMapper indexMapper;
    /**
     * 轮播图
     */
    @Override
    public List<IndexImg> slideshow() {
        List<IndexImg> list = indexMapper.SelectIndexImg();
        log.info("轮播图Mapper层返回数据：{}",list);
        log.info("轮播图Service返回参数：{}",list);
        return list;
    }

    @Override
    public List<CategoryVo> getCategoryVo() {

        List<CategoryVo> categoryVos = indexMapper.selectCategory();

        return categoryVos;
    }
}
